import 'package:get_it/get_it.dart';
import 'package:learning_content_admin_pannel.core/injection_container.dart' as core_di;
import 'package:learning_content_admin_pannel.home.words/all_word_page/domain/use_cases/get_initial_data/use_case.dart';
import 'package:learning_content_admin_pannel.home.words/all_word_page/domain/use_cases/handle_learning_content_outer_update/use_case.dart';
import 'package:learning_content_admin_pannel.home.words/all_word_page/domain/use_cases/handle_single_word_base_page_opening_request/use_case.dart';
import 'package:learning_content_admin_pannel.home.words/all_word_page/domain/use_cases/handle_single_word_translation_page_opening_request/use_case.dart';

final sl = GetIt.asNewInstance();

Future<void> init() async {
  sl.registerLazySingleton<GetInitialData>(() {
    return const GetInitialDataImpl();
  });

  sl.registerLazySingleton<HandleLearningContentOuterUpdate>(() {
    return const HandleLearningContentOuterUpdateImpl();
  });

  sl.registerLazySingleton<HandleSingleWordBasePageOpeningRequest>(() {
    return HandleSingleWordBasePageOpeningRequestImpl(
      handleRootNavigatorPagePushRequest: core_di.sl(),
    );
  });

  sl.registerLazySingleton<HandleSingleWordTranslationPageOpeningRequest>(() {
    return HandleSingleWordTranslationPageOpeningRequestImpl(
      handleRootNavigatorPagePushRequest: core_di.sl(),
    );
  });
}
